function beta = update_beta(H, HP)

base_kernel_num = length(HP);
V = zeros(base_kernel_num,1);
temp = H*H';
temp = (temp + temp') / 2;
for i1=1:base_kernel_num
    V(i1) = trace(temp*HP{i1}*HP{i1}');
end

beta = V./norm(V,2);

end

